/*
   Copyright (c) Microsoft Corp.  All rights reserved.                 
*/

//////////////////////////////////////////////////////////
// Client Errors
//////////////////////////////////////////////////////////

//
//  Values are 32 bit values laid out as follows:
//
//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
//  +---+-+-+-----------------------+-------------------------------+
//  |Sev|C|R|     Facility          |               Code            |
//  +---+-+-+-----------------------+-------------------------------+
//
//  where
//
//      Sev - is the severity code
//
//          00 - Success
//          01 - Informational
//          10 - Warning
//          11 - Error
//
//      C - is the Customer code flag
//
//      R - is a reserved bit
//
//      Facility - is the facility code
//
//      Code - is the facility's status code
//
//
// Define the facility codes
//
#define TDMS_FACILITY_SERVER             0x0
#define TDMS_FACILITY_CLIENT             0x1


//
// Define the severity codes
//
#define TDMS_STATUS_SEVERITY_SUCCESS     0x0
#define TDMS_STATUS_SEVERITY_ERROR       0x2


//
// MessageId: TDMS_E_INVALID_CORPUS_ID
//
// MessageText:
//
// Corpus Id value should be greater than 0
//
#define TDMS_E_INVALID_CORPUS_ID         ((HRESULT)0x80011101L)

//
// MessageId: TDMS_E_ANONYMOUS_ACCESS_DENIED
//
// MessageText:
//
// The corpora you are trying to deploy is not allowed for anonymous access.
// You are either accessing the system with non-domain account or your user account does not have Tdms access.
// To request access, please see Tdms documentation at http://tdms.redmond.corp.microsoft.com.
//
#define TDMS_E_ANONYMOUS_ACCESS_DENIED   ((HRESULT)0x80011102L)

//
// MessageId: TDMS_E_CORPUS_NOT_FOUND
//
// MessageText:
//
// The corpus and / or requested corpus revision is not found.
//
#define TDMS_E_CORPUS_NOT_FOUND          ((HRESULT)0x80011103L)

//
// MessageId: TDMS_E_FILE_SHARE_ACCESS_DENIED
//
// MessageText:
//
// Unable to copy corpora from a file share
//
#define TDMS_E_FILE_SHARE_ACCESS_DENIED  ((HRESULT)0x80011104L)

//
// MessageId: TDMS_E_CORPUS_ALREADY_EXISTS
//
// MessageText:
//
// The corpus with specified name already exists
//
#define TDMS_E_CORPUS_ALREADY_EXISTS     ((HRESULT)0x80011105L)

//
// MessageId: TDMS_E_SERVER_ERROR_FORMAT
//
// MessageText:
//
// Client is unable to interpret server error format
//
#define TDMS_E_SERVER_ERROR_FORMAT       ((HRESULT)0x80011106L)

//
// MessageId: TDMS_E_CORPUS_ALREADY_LOCKED
//
// MessageText:
//
// The corpus with specified id already locked for modification
//
#define TDMS_E_CORPUS_ALREADY_LOCKED     ((HRESULT)0x80011107L)

//
// MessageId: TDMS_E_CORPUS_NOT_LOCKED
//
// MessageText:
//
// The corpus with specified id not locked for modification. Possibly the lock interval expired.
//
#define TDMS_E_CORPUS_NOT_LOCKED         ((HRESULT)0x80011108L)

//
// MessageId: TDMS_E_INCOMPATIBLE_CLIENT_VERSION
//
// MessageText:
//
// The client version is not supported. Please update to the more recent version of the client.
//
#define TDMS_E_INCOMPATIBLE_CLIENT_VERSION ((HRESULT)0x80011109L)

//
// MessageId: TDMS_E_DEPLOYMENT_PENDING
//
// MessageText:
//
// Deploy has not been called.
//
#define TDMS_E_DEPLOYMENT_PENDING        ((HRESULT)0x8001110AL)

//
// MessageId: TDMS_E_MULTIPLE_DEPLOY_ATTEMPTS
//
// MessageText:
//
// The operation is denied. The user has called Deploy muiltiple times. Deploy is allowed to be called only once.
//
#define TDMS_E_MULTIPLE_DEPLOY_ATTEMPTS  ((HRESULT)0x8001110BL)

//
// MessageId: TDMS_E_FAILED_CONNECT_TO_SERVER
//
// MessageText:
//
// Failed connecting to TDMS Web server.
//
#define TDMS_E_FAILED_CONNECT_TO_SERVER  ((HRESULT)0x8001110CL)

//
// MessageId: TDMS_E_INTERNAL_CLIENT_ERROR
//
// MessageText:
//
// Unspecified internal client error.
//
#define TDMS_E_INTERNAL_CLIENT_ERROR     ((HRESULT)0x8001110DL)

//
// MessageId: TDMS_E_CACHED_CORPUS_NOT_FOUND
//
// MessageText:
//
// The requested corpus does not exist in local cache.
//
#define TDMS_E_CACHED_CORPUS_NOT_FOUND   ((HRESULT)0x8001110EL)

//
// MessageId: TDMS_E_INVALID_SELECTION_QUERY
//
// MessageText:
//
// Selection query is invalid.
//
#define TDMS_E_INVALID_SELECTION_QUERY   ((HRESULT)0x80000001L)

//
// MessageId: TDMS_E_UNSUPPORTED_CACHE_VERSION
//
// MessageText:
//
// Tdms cache found on the machine is unsupported. Also, the cache location is either read-only, so Tdms is unable to automatically replace it with the supported cache. If you use Tdms "Run from CD scenario", you must rebuild your pre-cached Tdms data.
//
#define TDMS_E_UNSUPPORTED_CACHE_VERSION ((HRESULT)0x80000002L)

//
// MessageId: TDMS_E_FILES_NOT_FOUND
//
// MessageText:
//
// The corpus / revision does not contain files that match the selection query.
//
#define TDMS_E_FILES_NOT_FOUND           ((HRESULT)0x80000003L)

//////////////////////////////////////////////////////////
// Server Errors
//////////////////////////////////////////////////////////
//
// MessageId: TDMS_E_INTERNAL_SERVER_ERROR
//
// MessageText:
//
// Unspecified server error
//
#define TDMS_E_INTERNAL_SERVER_ERROR     ((HRESULT)0x80001201L)

//
// MessageId: TDMS_E_INSUFFICIENT_PRIVILEGES
//
// MessageText:
//
// User does not have access to the system
//
#define TDMS_E_INSUFFICIENT_PRIVILEGES   ((HRESULT)0x80001202L)

//
// MessageId: TDMS_E_DATABASE_OPERATION_PROCESSING_TIMEDOUT
//
// MessageText:
//
// Database operation processing timed out. Please try again this operation later.
//
#define TDMS_E_DATABASE_OPERATION_PROCESSING_TIMEDOUT ((HRESULT)0x80001203L)

//
// MessageId: TDMS_E_DATABASE_CONNECTION_ERROR
//
// MessageText:
//
// Unable to connect to Tdms database. Please try connecting again later.
//
#define TDMS_E_DATABASE_CONNECTION_ERROR ((HRESULT)0x80001204L)

//
// MessageId: TDMS_E_SERVER_INTERNAL_CONNECTION_ERROR
//
// MessageText:
//
// Unable to connect to Tdms server due to internal server error.
//
#define TDMS_E_SERVER_INTERNAL_CONNECTION_ERROR ((HRESULT)0x80001205L)

